class MinePointListModel {
  double? amount;
  int? pointsId;
  String? pointsName;
  String? pointsImageUrl;
  int? userId;

  MinePointListModel({
    this.amount,
    this.pointsId,
    this.pointsName,
    this.userId,
    this.pointsImageUrl,
  });

  MinePointListModel.fromJson(Map<String, dynamic> json) {
    if (json["amount"] is num) {
      amount = (json["amount"] as num).toDouble();
    }
    if (json["pointsId"] is num) {
      pointsId = (json["pointsId"] as num).toInt();
    }
    if (json["pointsName"] is String) {
      pointsName = json["pointsName"];
    }
    if (json["pointsImageUrl"] is String) {
      pointsImageUrl = json["pointsImageUrl"];
    }
    if (json["userId"] is num) {
      userId = (json["userId"] as num).toInt();
    }
  }

  static List<MinePointListModel> fromList(List<Map<String, dynamic>> list) {
    return list.map(MinePointListModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["amount"] = amount;
    _data["pointsId"] = pointsId;
    _data["pointsName"] = pointsName;
    _data["pointsImageUrl"] = pointsImageUrl;
    _data["userId"] = userId;
    return _data;
  }
}
